package com.xinz.model;

import com.google.code.morphia.annotations.Entity;
import com.google.code.morphia.annotations.Transient;

/**
 * Model基类
 *
 */
public class BaseModel {

	public static final String ID_KEY = "_id";
	
	@Transient
	private boolean isLoaded;	// 是否从DB加载过

	public boolean isLoaded() {
		return isLoaded;
	}

	public void setLoaded(boolean isLoaded) {
		this.isLoaded = isLoaded;
	}
	
	public String getTable() {
		Entity entity = this.getClass().getAnnotation(Entity.class);
		return entity.value();
	}
}
